begintalkscript;
variables;


begintalknode 1; // Clubs
state = -1;
nextstate = 1;
condition = 1;
question = "Clubs";
text1 = "A muscular man sits behind the counter with a variety of equipment with him.";
text2 = "_Hello, I'm Cornelius, but you can call me Clubs. I rule the one of the towns smiths which produces iron._";
action = INTRO;
text5 = "_Why hello! Something else you wan't?_";

begintalknode 2;
state = 1;
nextstate = 2;
condition = 1;
question = "One of the town smiths?";
text1 = "_Yeah. This town contains three of them. Mine, which produces war equipment and horse shoes. Arnold's, which produces jewelry._";
text2 = "_And finally Bob's, which I'm not quite sure about. We need the smiths, because you get more paid for finished wares than raw materials._";

begintalknode 3;
state = 2;
nextstate = 3;
condition = 1;
question = "Where do you get all the ore for the smiths?";
text1 = "_Goldar has built several mines at the beginning of this peninsula. However, we have had a bunch of problems with the ogres who live nearby._";
text2 = "_That problem has never been as serious as recently._";

begintalknode 4;
state = 3;
nextstate = -1;
condition = 1;
question = "Do you know why the ogres are in need of ore?";
text1 = "_I have generally no idea about what the ogres want with our mines. They just come in there and hide in the tunnels. And when you enter the tunnel, they kill you._";
text2 = "_Strange, no-one has ever reported any theft of the ore. Adventurers like you should go out there and tell them to leave!_";

begintalknode 5;
state = 1;
nextstate = 1;
condition = 1;
question = "Can we trade?";
text1 = "You finish shopping.";
code = 
    begin_shop_mode("Clubs Smithy", "Clubs takes some of the stuff on the table. It's a wide variety of things, from blades to bracers.", 0, 4, 6);
break;

begintalknode 6;
state = 2;
nextstate = 2;
condition = get_flag(106, 6) == 0;
question = "You shoe horses? Could we buy some? (Pay 800 coins)";
text1 = "_Sorry, I'm afraid that they're allNo, wait! There's some still left in the stables next door._";
text2 = "_It's 800 coins. Sorry for the expensive price. You're lucky to buy them; If they would be cheaper they would propably have been bought already._";
text3 = "_They're a fine race which survives in the desert's heat, the marshes moister, and the cold of caves. Besides that, I've heard that they also survive on volcaoes._";
text4 = "_Sorry, I'm afraid we can't haggle down the prices. Those horses cost me a lot, and I would like to have some credits of them._";
code =
clear_strings();
if (coins_amount() >= 800)
    {
    set_flag(106, 6, 1);
    play_sound(15);
    set_horse_property(0, 1);
    change_coins(-800);
    add_string(1);
    add_string(2);
    add_string(3);
    }
else add_string(4);
break;







begintalknode 7; // Arnold
state = -1;
nextstate = 8;
condition = 1;
question = "Arnold";
text1 = "There is a young man sitting at a counter with fine pincers, scalpels and precious metal sticks working on a gold chain.";
text2 = "_Hello, adventurers. My name is Arnold. I run the gold smith. Or will run as long as possible._";
action = INTRO;
text5 = "Arnold is still working on the chain. Must be hard work.";

begintalknode 8;
state = 8;
nextstate = 9;
condition = 1;
question = "Is something wrong?";
text1 = "_Yes! And next you'll propably ask if you could do anything to help!!!._";
text2 = "_Yes. It's ogres. There are lot's of them hiding in the mines. Hurting people. But none of them steals any ore! They just hide there._";
text3 = "_I'd say they're afraid of something outside. Sounds stupid - really stupid - but none of them has done anything offensive if the tunnels they invaded are left alone._";
text4 = "_Somebody should try speaking to them, but they're stupid and violent. I'm sure you could do it much better than we because_";
text5 = "_I mean ogres would understand you better because you are more_ He clearly wanted to say something about you but hesisted.";

begintalknode 9;
state = 9;
nextstate = 10;
condition = 1;
question = "Spit it out!";
text1 = "_You are adventurers. Ogres talk to them, not to us!_ A long pause _Sorry, I don't want to mock you though I have opinions of your caste, but you asked for it._";
text2 = "Yet another pause _I'll tell you a secret. North of the Inn of the Moose is an empty section between the walls. It's sealed away, but it still has a hidden entrance._"; 
text3 = "_Follow the north wall to the east, and you'll find it._";
text4 = "I believe it's still out of order, but I haven't been there for a while. I believe you could find some of the leftover building materials and tools._";
text5 = "But I don't think you will find 'two Vahnatais who imprison people and do magical experiments with them'. Hahaha._";

begintalknode 10;
state = 9;
nextstate = -1;
condition = 1;
question = "There are many things we could do better than you in deed. So, 'Can we do anything to help?'";
text1 = "_Now that's adventurers I like! Yes, they have stopped delivering ore. I will not give you an official job, but I'll get you a bargain if you do something about it._";
text2 = "_You should go se Janice in the Goldar Mines Office. You could easily get hired by her._";

begintalknode 11;
state = 10;
nextstate = -1;
condition = 1;
question = "Man, have you ever met an adventurer before? Have you always thought that WE are stupid and violent?";
text1 = "_No, I haven't. But now I've seen some. And I tell you that my stepfather Bob (he spits it out) has always been wrong about you._";
text2 = "_I don't know why, perhaps he was wounded by an adventurer in the past, but he has always taught me to not have anything to do with you mercenaries. That liar!_";

begintalknode 12;
state = 8;
nextstate = 8;
condition = 1;
question = "Can we trade?";
text1 = "You finish shopping.";
code = 
    begin_shop_mode("Arnolds Jewelry", "Arnold has made some nice jewelry. Most are only for show, but some of them are magical.", 14, 4, 6);
break;

begintalknode 13;
state = 8;
nextstate = 8;
condition = get_flag(106, 16) == 1;
question = "Your stepfather told me that HE has adventurer skills?!";
text1 = "_Oh! Well, you're not the first one to hear that false story. There was a young man, Otto was his name, I think. Anyway, he was an adventurer._";
text2 = "_When he told me the same thing about Bob I didn't believe him. But now I do._";
text3 = "_There must be something that he is envious of in adventurers and also something that stops him from becoming one. Maybe it has something to do with his fitness_";

// Bob
begintalknode 15;
state = -1;
nextstate = 11;
question = "Bob";
condition = 1;
text1 = "An old man sits behind the counter, half asleep. He is quite short and a bit too well fed. You wake him up.";
text2 = "_ZZZWhat! Oh. Humph! Adventurers. This is my shop. What do you want? Give me your names, and I shall give you mine!_";
action = INTRO;
text5 = "Bob sits still here, trying using grim looks to make you realize how much he hates adventurers.";

begintalknode 16;
state = 11;
nextstate = -1;
condition = get_flag(106, 16) == 0;
question = "I would cut of your head, peck, if it stood a little higher from the ground!";
text1 = "_Oh, quit it! I know you could give a nice try, but I don't want to fight you. You're weapon skills are so weak compared to mine._";
text2 = "_And you have a job to do here, I've heard. So I shall let you live so far._ He's clearly annoying you on purpose.";
code = set_flag(106, 16, 1); break;

begintalknode 17;
state = 11;
nextstate = 11;
question = "Can we trade?";
text1 = "You shop a little.";
code = begin_shop_mode("Bob's 'Smithy'", "You don't think that Bob has made this stuff here.", 15, 6, -1); break;

begintalknode 18;
state = 11;
nextstate = -1;
question = "Tell me about Goldar.";
text1 = "_There's nothing worth to tell you. Look, I didn't let you in here to chat with me. Just buy what you need and then scram!_";


// Janice
begintalknode 20;
state = -1;
nextstate = 20;
question = "Janice";
condition = 1;
text1 = "You meet the mayor of this city. She is a woman, not very old. Signs on her indicate, however, that she did not become the mayor yesterday.";
text2 = "_What is it youAdventurers, at last! I have been expecting you. I'm Mayor Janice, Empire Liaison and president of the Goldar mining company. I have a job for you._";
action = INTRO;
text5 = "_Yes?_";

begintalknode 21;
state = 20;
nextstate = 21;
condition = get_flag(106, 21) == 0;
question = "What is the job you have for me?";
text1 = "_Well, you've probably heard of the ogres that invaded our mines. They just came and seized a band of miners into a cave._";
text2 = "_We can't get resources from there until the ogres are driven away or killed. Will you do the job?_";

begintalknode 22;
state = 21;
nextstate = 20;
condition = 1;
question = "I'll do it!";
text1 = "_Great! There should me more of you brave cunning adventurers. I'll make sure you'll be rewarded after finishing the job._";
text2 = "_And take this with you._ She hands you a tiny, beautiful key. _It is the key for the mine dock. Open it for the miners after you free them._";
code = set_flag(106, 21, 1); toggle_quest(3, 1); change_spec_item(1, 1); break; 

begintalknode 23;
state = 20;
nextstate = 22;
question = "Tell me about the problems I have come to solve.";
condition = 1;
text1 = "_I'll tell you everything I know about the crimes. First, there was an explosion in the middle of the night at the naga lair._";
text2 = "_The naga had been knocked unconscious with some cunning magic._";
text3 = "_The explosion had awakened the town guard in Alexandra. They traced the explosion and found a band of slith-like humanoids with the naga in a sack running northeast._";
text4 = "_They ran after them._";
text5 = "_The chase continued in the morning. One of the scouts rode past the humanoids to warn the fishing village Haville._";
text6 = "_The militia of Haville couldn't stop the lizard men either. Using the same magic when capturing the naga, the lizards broke the town walls and killed everyone._";
text7 = "_Then, they ran towards the Nepheline woods, hoping for losing the chasers. They did not hope in vain. This is where we lost them._";
text8 = "_This is also where you come in. Go see the governor in Alexandra. He'll tell you in detail what you're supposed to do._";

begintalknode 24;
state = 22;
nextstate = 22;
condition = 1;
question = "Tell me about Haville.";
text1 = "_Haville was the second settlement here. The cold river delta tends to attract fish. Thus, many of the people who came here were fishers. Haville was built by them._";
text2 = "_Now it's gone._";

begintalknode 25;
state = 22;
nextstate = 22;
condition = 1;
question = "Tell me about the Nepheline woods.";
text1 = "_It is a forest with huge trees, some with their tops as high as clouds. Many believe that it is the origin of the nephilim._";
text2 = "_Speaking of clouds, the name 'Nepheline' is relating to a cloud and the word 'Nephil' means 'One who has come down from the clouds'._";
text3 = "_Also, some of the fluffiest furs of nephilim are often likened to clouds.  Maybe you noticed that I have studied history a lot._";

begintalknode 35;
state = 20;
nextstate = 20;
condition = get_flag(106, 21) == 2;
question = "I have saved the miners and rid the mine of ogres.";
text1 = "_Thank you, adventurers. You shall be rewarded with gold._ She hands you three pouches with coins. _I hope this'll be one of many good things that you will do here._";
code = set_flag(106, 21, 3); change_coins(1000); award_party_xp(500, 20); break;

// Mark
begintalknode 26;
state = -1;
nextstate = 30;
condition = 1;
question = "Mark";
text1 = "The innkeeper seems to be a rich man. The inn he's keeping is like a reflection of his wealth.";
text2 = "_Hiya! Welcome to the Inn of the Moose. I'm Mark, the innkeeper. How can I help you?_";

begintalknode 27;
state = 30;
nextstate = 31;
condition = 1;
question = "What do you serve?";
text1 = "_Here we serve ale. 10 coins one round. We have also beer, 15 coins, and fine wine, 20 coins one round. Bread can also be bought here._";
text2 = "_And, of course, a night room and board is also available._";

begintalknode 28;
state = 31;
nextstate = 31;
condition = 1;
question = "I'm thirsty. Ale, please. (pay 10 coins)";
text1 = "_Here you are._ The ale is quite bitter, but has a sweet hue. You get a little drunk.";
code = change_coins(-10); set_char_status(1000, 28, 10, 0, 1); break;

begintalknode 29;
state = 31;
nextstate = 31;
condition = 1;
question = "A round of beer, please. (pay 15 coins)";
text1 = "_Here._ The beer has got a quite bitter taste, but it has some delicious spices. You get slightly drunk.";
code = change_coins(-15); set_char_status(1000, 28, 15, 0, 1); break;

begintalknode 30;
state = 31;
nextstate = 31;
condition = 1;
question = "I would like to have some of your wine, please. (pay 20 coins)";                                                                                                                                                                                                   
text1 = "_Here._ The wine has a lovely warm and sweet flavour. You get drunk.";
code = change_coins(-20); set_char_status(1000, 28, 15, 0, 1); break;

begintalknode 31;
state = 31;
nextstate = 31;
condition = 1;
question = "Could I buy rations?";
text1 = "You finish shopping.";
code = begin_shop_mode("Inn of the Moose", "The bread is recently made. It is still warm. The good smell coming from it could make anyone hungry.", 3, 4, 6); break;

begintalknode 32;
state = 31;
nextstate = 32;
condition = 1;
question = "I'd like to stay over night.";
text1 = "_Okay. Wait! There are two kinds of rooms available. The common room is 15 coins one night. There nice room is 25 coins one night. Which do you take?_";
code = break;

begintalknode 33;
state = 32;
nextstate = -1;
condition = 1;
question = "One night in the common room. (Pay 15 coins)";
text1 = "_Okay, I hope you will have a good time, though it is only a common room._";
text3 = "_Ahem, you can't afford this room. Sorry. Inns aren't run for free._";
code = break; 
action = INN 15 32 7;

begintalknode 34;
state = 32;
nextstate = 32;
condition = 1;
question = "One night in the private room. (Pay 25 coins)";
text1 = "_Okay, I hope you will have a good time in your nice private room. Also, look in the dresser. We like giving extra gifts to paying customers._";
text3 = "_Ahem, you can't afford this room. Sorry. Inns aren't run for free. Perhaps you should try the common room instead._";
code = put_item_on_spot(33, 12, get_ran(1, 401, 406)); break; 
action = INN 25 34 13;

